package com.kun.music.service.impl;

import com.kun.music.dao.SongListMapper;
import com.kun.music.domain.SongList;
import com.kun.music.service.SongListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fangkun
 * @create 2022-12-21-16:13
 */
@Service
public class SongListServiceImpl implements SongListService {

    @Autowired
    private SongListMapper songListMapper;
    @Override
    public List<SongList> allSongList() {
        return songListMapper.allSongList();
    }

    @Override
    public boolean addSongList(SongList songList) {

        return songListMapper.addSongList(songList) > 0 ? true : false;
    }

    @Override
    public boolean updateSongListMsg(SongList songList) {

        return songListMapper.updateSongListMsg(songList) > 0 ? true : false;
    }

    @Override
    public boolean deleteSongList(int id) {
        return songListMapper.deleteSongList(id) > 0 ? true : false;
    }

    @Override
    public List<SongList> getSongListByName(String name) {
        return songListMapper.getSongListByName(name);
    }
}
